<template>
  <div>
    <el-table
      :data="rightsData"
      style="width: 100%; margin-bottom: 20px"
      row-key="id"
      border
      default-expand-all
    >
      <el-table-column prop="id" label="ID" sortable> </el-table-column>
      <el-table-column prop="authName" label="权限"> </el-table-column>
      <el-table-column prop="level" label="等级" sortable></el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      rightsData: [],
    };
  },
  async mounted() {
    var { data } = await this.$req.get("/rights/list");
    // console.log(data);
    this.rightsData = data.data;
    // console.log(this.rightsData);
  },
};
</script>

<style>
</style>